package com.zxing.dubbo.interfaces.dto;

import lombok.Data;

import java.io.Serializable;

@Data
public class ResponseDTO<T> implements Serializable {

    private String code;
    private T body;

    public static <T> ResponseDTO<T> ok(T body){
        ResponseDTO<T> responseDTO = new ResponseDTO<>();
        responseDTO.setCode("success");
        responseDTO.setBody(body);
        return responseDTO;
    }
}
